<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent)</TargetFrameworks>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <ForceManagedImplementation>false</ForceManagedImplementation>
    <UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
  </PropertyGroup>

  <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
  <PropertyGroup>
    <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
    <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.SystemNetHttpListener_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
    <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'windows'">$(DefineConstants);TARGET_WINDOWS</DefineConstants>
  </PropertyGroup>

  <ItemGroup>
    <Reference Include="Microsoft.Win32.Primitives" />
    <Reference Include="System.Collections" />
    <Reference Include="System.Collections.NonGeneric" />
    <Reference Include="System.Collections.Specialized" />
    <Reference Include="System.Diagnostics.Tracing" />
    <Reference Include="System.Memory" />
    <Reference Include="System.Net.NameResolution" />
    <Reference Include="System.Net.Primitives" />
    <Reference Include="System.Net.Requests" />
    <Reference Include="System.Net.Security" />
    <Reference Include="System.Net.WebHeaderCollection" />
    <Reference Include="System.Net.WebSockets" />
    <Reference Include="System.Net.WebSockets.Client" />
    <Reference Include="System.Numerics.Vectors" />
    <Reference Include="System.Runtime" />
    <Reference Include="System.Runtime.InteropServices" />
    <Reference Include="System.Security.Claims" />
    <Reference Include="System.Security.Cryptography" />
    <Reference Include="System.Security.Principal.Windows" />
    <Reference Include="System.Text.Encoding.Extensions" />
    <Reference Include="System.Threading" />
    <Reference Include="System.Threading.Overlapped" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
    <Compile Include="System\Net\BoundaryType.cs" />
    <Compile Include="System\Net\EntitySendFormat.cs" />
    <Compile Include="System\Net\HttpListenerPrefixCollection.cs" />
    <Compile Include="System\Net\HttpRequestStream.cs" />
    <Compile Include="System\Net\AuthenticationTypes.cs" />
    <Compile Include="System\Net\HttpResponseStream.cs" />
    <Compile Include="System\Net\ServiceNameStore.cs" />
    <Compile Include="System\Net\HttpListenerRequest.cs" />
    <Compile Include="System\Net\HttpListenerRequestUriBuilder.cs" />
    <Compile Include="System\Net\AuthenticationSchemeSelector.cs" />
    <Compile Include="System\Net\HttpListener.cs" />
    <Compile Include="System\Net\HttpListenerBasicIdentity.cs" />
    <Compile Include="System\Net\HttpListenerContext.cs" />
    <Compile Include="System\Net\HttpListenerException.cs" />
    <Compile Include="System\Net\HttpListenerResponse.cs" />
    <Compile Include="System\Net\ListenerClientCertState.cs" />
    <Compile Include="System\Net\NetEventSource.HttpListener.cs" />
    <Compile Include="System\Net\WebSockets\HttpListenerWebSocketContext.cs" />
    <Compile Include="System\Net\WebSockets\HttpWebSocket.cs" />
    <Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
             Link="Common\DisableRuntimeMarshalling.cs" />
    <Compile Include="$(CommonPath)System\Net\Logging\NetEventSource.Common.cs"
             Link="Common\System\Net\Logging\NetEventSource.Common.cs" />
    <Compile Include="$(CommonPath)System\Net\Logging\NetEventSource.Common.Associate.cs"
             Link="Common\System\Net\Logging\NetEventSource.Common.Associate.cs" />
    <Compile Include="$(CommonPath)System\Net\Logging\NetEventSource.Common.DumpBuffer.cs"
             Link="Common\System\Net\Logging\NetEventSource.Common.DumpBuffer.cs" />
    <Compile Include="$(CommonPath)System\Net\CookieComparer.cs"
             Link="Common\System\Net\CookieComparer.cs" />
    <Compile Include="$(CommonPath)System\Net\CookieFields.cs"
             Link="Common\System\Net\CookieFields.cs" />
    <Compile Include="$(CommonPath)System\Net\CookieParser.cs"
             Link="Common\System\Net\CookieParser.cs" />
    <Compile Include="$(CommonPath)System\Net\ExceptionCheck.cs"
             Link="Common\System\Net\ExceptionCheck.cs" />
    <Compile Include="$(CommonPath)System\Net\HttpStatusDescription.cs"
             Link="Common\System\Net\HttpStatusDescription.cs" />
    <Compile Include="$(CommonPath)System\Net\HttpKnownHeaderNames.cs"
             Link="Common\System\Net\HttpKnownHeaderNames.cs" />
    <Compile Include="$(CommonPath)System\Net\LazyAsyncResult.cs"
             Link="Common\System\Net\LazyAsyncResult.cs" />
    <Compile Include="$(CommonPath)System\Net\UriScheme.cs"
             Link="Common\System\Net\UriScheme.cs" />
    <Compile Include="$(CommonPath)System\Net\WebHeaderEncoding.cs"
             Link="Common\System\Net\WebHeaderEncoding.cs" />
    <Compile Include="$(CommonPath)System\Net\WebSockets\WebSocketValidate.cs"
             Link="Common\System\Net\WebSockets\WebSocketValidate.cs" />
    <Compile Include="System\Net\Windows\CookieExtensions.cs" />
    <Compile Include="$(CommonPath)System\HexConverter.cs"
             Link="Common\System\HexConverter.cs" />
    <Compile Include="$(CommonPath)System\Obsoletions.cs"
            Link="Common\System\Obsoletions.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows' and '$(ForceManagedImplementation)' != 'true'">
    <Compile Include="System\Net\Windows\HttpListener.Windows.cs" />
    <Compile Include="System\Net\Windows\HttpListenerSession.Windows.cs" />
    <Compile Include="System\Net\Windows\HttpListenerContext.Windows.cs" />
    <Compile Include="System\Net\Windows\HttpListenerRequest.Windows.cs" />
    <Compile Include="System\Net\Windows\HttpListenerResponse.Windows.cs" />
    <Compile Include="System\Net\Windows\HttpListenerTimeoutManager.Windows.cs" />
    <Compile Include="System\Net\Windows\HttpRequestQueueV2Handle.cs" />
    <Compile Include="System\Net\Windows\HttpServerSessionHandle.cs" />
    <Compile Include="System\Net\Windows\HttpListenerRequestContext.cs" />
    <Compile Include="System\Net\Windows\ListenerClientCertAsyncResult.Windows.cs" />
    <Compile Include="System\Net\Windows\AsyncRequestContext.cs" />
    <Compile Include="System\Net\Windows\RequestContextBase.cs" />
    <Compile Include="System\Net\Windows\SyncRequestContext.cs" />
    <Compile Include="System\Net\Windows\ListenerAsyncResult.Windows.cs" />
    <Compile Include="$(CommonPath)System\Net\DebugSafeHandle.cs"
             Link="Common\System\Net\DebugSafeHandle.cs" />
    <Compile Include="$(CommonPath)System\Net\InternalException.cs"
             Link="Common\System\Net\InternalException.cs" />
    <Compile Include="System\Net\Windows\HttpResponseStream.Windows.cs" />
    <Compile Include="System\Net\Windows\HttpResponseStreamAsyncResult.cs" />
    <Compile Include="System\Net\Windows\WebSockets\ServerWebSocket.cs" />
    <Compile Include="System\Net\Windows\WebSockets\HttpWebSocket.Windows.cs" />
    <Compile Include="System\Net\Windows\WebSockets\WebSocketBase.cs" />
    <Compile Include="System\Net\Windows\WebSockets\WebSocketBuffer.cs" />
    <Compile Include="System\Net\Windows\WebSockets\SafeWebSocketHandle.cs" />
    <Compile Include="System\Net\Windows\HttpRequestStream.Windows.cs" />
    <Compile Include="System\Net\Windows\WebSockets\WebSocketHttpListenerDuplexStream.cs" />
    <Compile Include="System\Net\Windows\WebSockets\WebSocketProtocolComponent.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
             Link="Common\Interop\Windows\Interop.Libraries.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Interop.UNICODE_STRING.cs"
             Link="Common\Interop\Windows\Interop.UNICODE_STRING.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Interop.BOOL.cs"
             Link="Common\Interop\Windows\Interop.BOOL.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\WebSocket\Interop.Structs.cs"
             Link="Common\Interop\Windows\WebSocket\Interop.Structs.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\WebSocket\Interop.WebSocketAbortHandle.cs"
             Link="Common\Interop\Windows\WebSocket\Interop.WebSocketAbortHandle.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\WebSocket\Interop.WebSocketBeginClientHandshake.cs"
             Link="Common\Interop\Windows\WebSocket\Interop.WebSocketBeginClientHandshake.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\WebSocket\Interop.WebSocketBeginServerHandshake.cs"
             Link="Common\Interop\Windows\WebSocket\Interop.WebSocketBeginServerHandshake.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\WebSocket\Interop.WebSocketCompleteAction.cs"
             Link="Common\Interop\Windows\WebSocket\Interop.WebSocketCompleteAction.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\WebSocket\Interop.WebSocketCreateClientHandle.cs"
             Link="Common\Interop\Windows\WebSocket\Interop.WebSocketCreateClientHandle.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\WebSocket\Interop.WebSocketCreateServerHandle.cs"
             Link="Common\Interop\Windows\WebSocket\Interop.WebSocketCreateServerHandle.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\WebSocket\Interop.WebSocketDeleteHandle.cs"
             Link="Common\Interop\Windows\WebSocket\Interop.WebSocketDeleteHandle.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\WebSocket\Interop.WebSocketEndServerHandshake.cs"
             Link="Common\Interop\Windows\WebSocket\Interop.WebSocketEndServerHandshake.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\WebSocket\Interop.WebSocketGetAction.cs"
             Link="Common\Interop\Windows\WebSocket\Interop.WebSocketGetAction.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\WebSocket\Interop.WebSocketReceive.cs"
             Link="Common\Interop\Windows\WebSocket\Interop.WebSocketReceive.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\WebSocket\Interop.WebSocketSend.cs"
             Link="Common\Interop\Windows\WebSocket\Interop.WebSocketSend.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\HttpApi\Interop.ErrorCodes.cs"
             Link="Common\Interop\Windows\HttpApi\Interop.ErrorCodes.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\HttpApi\Interop.HttpApi.cs"
             Link="Common\Interop\Windows\HttpApi\Interop.HttpApi.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.SetFileCompletionNotificationModes.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.SetFileCompletionNotificationModes.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.CancelIoEx.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.CancelIoEx.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.LoadLibraryEx_IntPtr.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.LoadLibraryEx_IntPtr.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.SECURITY_ATTRIBUTES.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.SECURITY_ATTRIBUTES.cs" />
    <Compile Include="$(CommonPath)Microsoft\Win32\SafeHandles\SafeLocalAllocHandle.cs"
             Link="Common\Microsoft\Win32\SafeHandles\SafeLocalAllocHandle.cs" />
    <Compile Include="$(CommonPath)System\Net\NegotiationInfoClass.cs"
             Link="Common\System\Net\NegotiationInfoClass.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'unix' or '$(ForceManagedImplementation)' == 'true'">
    <Compile Include="System\Net\Managed\HttpEndPointListener.cs" />
    <Compile Include="System\Net\Managed\HttpEndPointManager.cs" />
    <Compile Include="System\Net\Managed\HttpConnection.cs" />
    <Compile Include="System\Net\Managed\HttpStreamAsyncResult.cs" />
    <Compile Include="System\Net\Managed\ListenerPrefix.cs" />
    <Compile Include="System\Net\Managed\HttpRequestStream.Managed.cs" />
    <Compile Include="System\Net\Managed\HttpListener.Managed.cs" />
    <Compile Include="System\Net\Managed\HttpListener.Certificates.cs" />
    <Compile Include="System\Net\Managed\HttpListenerContext.Managed.cs" />
    <Compile Include="System\Net\Managed\HttpListenerRequest.Managed.cs" />
    <Compile Include="System\Net\Managed\HttpListenerResponse.Managed.cs" />
    <Compile Include="System\Net\Managed\HttpListenerTimeoutManager.Managed.cs" />
    <Compile Include="System\Net\Managed\ListenerAsyncResult.Managed.cs" />
    <Compile Include="System\Net\Managed\HttpHeaderStrings.cs" />
    <Compile Include="System\Net\Managed\ChunkedInputStream.cs" />
    <Compile Include="System\Net\Managed\ChunkStream.cs" />
    <Compile Include="System\Net\Managed\HttpResponseStream.Managed.cs" />
    <Compile Include="System\Net\Managed\WebSockets\HttpWebSocket.Managed.cs" />
    <Reference Include="System.Net.Sockets" />
    <Reference Include="System.Threading.ThreadPool" />
  </ItemGroup>

</Project>
